// swift-tools-version:5.5

import PackageDescription

let package = Package(
    name: "Base_hanyz",
    platforms: [.iOS(.v10)],
    products: [
        .library(
            name: "Base_hanyz",
            targets: ["Base_hanyz"]),
        .library(name: "LoadingView",
                 targets: ["LoadingView"]),
    ],
    dependencies: [
        .package(url: "https://gitee.com/hanyzjob/SnapKit.git", .upToNextMajor(from: "5.0.1")),
        .package(url: "https://gitee.com/hanyzjob/SDWebImage.git", .upToNextMajor(from: "5.12.0")),
        .package(url: "https://gitee.com/hanyzjob/HandyJSON.git", .upToNextMajor(from: "5.0.2")),
        .package(name: "Toast", url: "https://gitee.com/hanyzjob/Toast-Swift.git", .upToNextMajor(from: "5.0.1")),
        .package(url: "https://gitee.com/hanyzjob/Alamofire.git", .upToNextMajor(from: "5.4.4")),
        .package(url: "https://gitee.com/hanyzjob/RxSwift.git", .upToNextMajor(from: "6.2.0")),
        .package(url: "https://gitee.com/hanyzjob/OHHTTPStubs.git", .upToNextMajor(from: "9.1.0")),
        .package(url: "https://gitee.com/hanyzjob/RxAlamofire.git", .upToNextMajor(from: "6.1.2")),
        .package(url: "https://gitee.com/hanyzjob/MJRefresh.git", .upToNextMajor(from: "3.7.2")),
        .package(url: "https://gitee.com/hanyzjob/RxDataSources.git", .upToNextMajor(from: "5.0.2"))
    ],
    targets: [
        .target(
            name: "Base_hanyz",
            dependencies: [
                .product(name: "SnapKit", package: "SnapKit"),
                .product(name: "SDWebImage", package: "SDWebImage"),
                .product(name: "HandyJSON", package: "HandyJSON"),
                .product(name: "Toast", package: "Toast"),
                .product(name: "Alamofire", package: "Alamofire"),
                .product(name: "RxSwift", package: "RxSwift"),
                .product(name: "RxCocoa", package: "RxSwift"),
                .product(name: "RxRelay", package: "RxSwift"),
                .product(name: "RxBlocking", package: "RxSwift"),
                .product(name: "OHHTTPStubs", package: "OHHTTPStubs"),
                .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs"),
                .product(name: "RxAlamofire", package: "RxAlamofire"),
                .product(name: "MJRefresh", package: "MJRefresh"),
                .product(name: "RxDataSources", package: "RxDataSources"),
            ]),
        .target(
            name: "LoadingView",
            dependencies: [
                .product(name: "RxSwift", package: "RxSwift"),
                .product(name: "RxCocoa", package: "RxSwift"),
            ]
        ),
    ],
    swiftLanguageVersions: [.v5]
)
